package com.hl.card.credit.pub.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hl.card.credit.pub.dao.AbstractDao;
import com.hl.card.credit.pub.dao.PublicTravelPDao;
import com.hl.card.credit.pub.entity.PublicTravelP;

//@Service
public class PublicTravelPService extends AbstractService<PublicTravelP, Integer> {

//	@Autowired
	private PublicTravelPDao<PublicTravelP, Integer> dao;

	@Override
	protected AbstractDao<PublicTravelP, Integer> getDao() {
		return dao;
	}

	public void addPublicTravelPBatch(List<PublicTravelP> list) {
		dao.addBatch(list);
	}

	/**
	 * 
	    * @Title: updateBySelectiveForUpdate
	    * @Description: TODO(根据cert_no和order_code 更新出行人信息)
	    * @param @param temp    参数
	    * @return void    返回类型
	    * @throws
	 */
	public void updateBySelectiveForUpdate(PublicTravelP temp) {
		dao.updateBySelectiveForUpdate(temp);

	}
	

	/**
	 * 
	    * @Title: updateByTravelP
	    * @Description: TODO(更新部分参数使用)
	    * @param @param publicTravelP    参数
	    * @return void    返回类型
	    * @throws
	 */
	public void updateByTravelP(PublicTravelP publicTravelP) {
		dao.updateByTravelP(publicTravelP);
	}
	
	/**
	 * 
	    * @Title: queryptpList
	    * @Description: TODO(根据出行人相关信息查询相应的数据，适用少量以内记录查询)
	    * @param @param publicTravelP
	    * @param @return    参数
	    * @return List<PublicTravelP>    返回类型
	    * @throws
	 */
	public List<PublicTravelP> queryptpList(PublicTravelP publicTravelP){
		return dao.queryptpList(publicTravelP);
	}
}
